<%@ page language="java" import="java.util.ResourceBundle"  contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>

<%
	String path = request.getContextPath();
%> 
<% ResourceBundle res=ResourceBundle.getBundle("imgUrl");%>
<%
	String prefixUrl = res.getString("prefixUrl");
    pageContext.setAttribute("prefixUrl",prefixUrl); 
%> 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<title>用户详情</title>
<style type="text/css">
.userTable td {
	border-bottom: 1px solid #928989;
	border-right: 1px solid #928989;
	line-height: 31px;
	overflow: hidden;
	padding: 0 3px;
	vertical-align: middle;
	font-size: 14px;
	
}

.userTable td a {
	color: #5dacd0;
}

.userTable {
	padding: 0;
	border: solid 1px #928989;
	width: 100%;
	line-height: 21px;
}

.tdGround {
	background: #f5f5f5 none repeat scroll 0 0;
	border: 1px solid darkgray;
	color: #555;
	font: 12px "Lucida Grande", Verdana, Lucida, Helvetica, Arial, 'Simsun',
		sans-serif;
	font-weight: bold;
}

.detailB th {
	border: 1px solid darkgray;
	color: #555;
	background: #f5ecec none repeat scroll 0 0;
	font-weight: bold;
	width: 100px;
	line-height: 21px;
}

/*   图片大小设置  */ 
.tdGround img{
width: 100px;
transition:all 0.3s
}

/*   图片鼠标移动放大  */ 
.tdGround img:hover{
width:550px;
}
</style>
</head>
<body>
	<div class="pageContent">
		<div class="pageFormContent" layoutH="50" style="overflow: auto;">
			<!-- 借款信息 -->
			<fieldset>
				<legend>借款信息</legend>
				<table class="userTable">
					<tbody>
						<tr>
							<td style="font-weight: bold">借款详情</td>
							<td>
								<table class="userTable">
									<tr>
										<td class="tdGround" style="width: 180px;">用户ID:</td>
										<td>${user.id}</td>
										<td class="tdGround" colspan="2">订单号:</td>
										<td colspan="2">${borrow.outTradeNo}</td>
									</tr>
									<tr>
										<td class="tdGround" style="width: 180px;">借款期限:</td>
										<td>${borrow.loanTerm }天</td>
										<td class="tdGround" colspan="2">当前状态:</td>
										<td colspan="2">${borrow.statusName }</td>
									</tr>
									<tr>
										<td class="tdGround">服务费:</td>
										<td><fmt:formatNumber type="number"
												value="${borrow.loanInterests/100}" pattern="0.00"
												maxFractionDigits="2" />元</td>
										<td class="tdGround" colspan="2">服务费费率‰:</td>
										<td colspan="2"><fmt:formatNumber type="number"
												value="${borrow.apr}" pattern="0.00" maxFractionDigits="2" /></td>
									</tr>
									<tr>

										<td class="tdGround" >申请时间:</td>
										<td ><fmt:formatDate
												value="${borrow.orderTime}" pattern="yyyy-MM-dd HH:mm:ss" /></td>
										<td class="tdGround" colspan="2">还款时间:</td>
										<td colspan="2"><fmt:formatDate value="${borrow.loanEndTime}"
												pattern="yyyy-MM-dd HH:mm:ss" /></td>
									</tr>
									<tr>
										<td class="tdGround">总额度:</td>
										<td><fmt:formatNumber type="number"
												value="${user.amountMax/100}" pattern="0.00"
												maxFractionDigits="2" />元</td>
										<td class="tdGround" colspan="2">剩余额度</td>
										<td colspan="2"><fmt:formatNumber type="number"
												value="${user.amountAvailable/100}" pattern="0.00"
												maxFractionDigits="2" />元</td>
										<!-- 										<td class="tdGround">剩余额度</td> -->
										<%-- 										<td>${user.amountAvailable}</td> --%>
									</tr>
								</table>
							</td>
						</tr>
					</tbody>
				</table>
			</fieldset>
			<!-- 个人信息 -->
			<fieldset>
				<legend>个人信息</legend>
				<table class="userTable">
					<tbody>
						<tr>
							<td style="font-weight: bold">个人详情</td>
							<td>
								<table class="userTable">
									<tr>
										<td class="tdGround" style="width: 180px;">用户ID:</td>
										<td>${user.id}</td>
										<td class="tdGround">姓名：</td>
										<td>${user.realname}</td>
										<td class="tdGround">身份证号</td>
										<td>${user.idNumber}</td>
										<td class="tdGround">联系方式:</td>
										<td>${user.userPhone}</td>
									</tr>
									<tr>
										<td class="tdGround" style="width: 180px;">出生日期</td>
										<td>${birthday}</td>
										<td class="tdGround">年龄</td>
										<td>${age}</td>
										<td class="tdGround">性别</td>
										<td>${user.userSex}</td>
										<td class="tdGround">婚姻</td>
										<td>${user.maritalStatus}</td>
									</tr>
									<tr>
										<td class="tdGround">学历：</td>
										<td>${user.education}</td>
										<td class="tdGround">常住地址</td>
										<td>${user.presentAddressDistinct}${user.presentAddress}
											</td>
										<td class="tdGround">居住时长：</td>
										<td>${user.presentPeriod}</td>
										<td class="tdGround">账号创建时间</td>
										<td><fmt:formatDate value="${user.createTime}"
												pattern="yyyy-MM-dd HH:mm:ss" /></td>
									</tr>
									<tr>
										<td class="tdGround" style="height: 100px; width: 180px;">学历证明:
										</td>
										<td><img src="" /></td>
										<td class="tdGround" style="height: 100px;">身份证:</td>
										<td>
											<c:if test="${user.idcardImgZ!=null}">
												<img src="${prefixUrl}${user.idcardImgZ}"/>
											</c:if>
											<c:if test="${user.idcardImgF!=null}">
												<img src="${prefixUrl}${user.idcardImgF}"/>
											</c:if>
										</td>
										<td class="tdGround" style="height: 100px;">个人名片:</td>
										<td>
											<c:if test="${user.headPortrait!=null}">
												<img src="${prefixUrl}${user.headPortrait}"/>
											</c:if>
										</td>
										<td class="tdGround" style="height: 100px;">财产证明:</td>
										<td><img src="" /></td>
									</tr>
								</table>
							</td>
						</tr>
						<tr>
							<td style="font-weight: bold">银行卡信息</td>
							<td>
								<table class="userTable">
									<tr>
										<td class="tdGround" style="width: 180px;">种类:</td>
										<td><c:choose>
												<c:when test="${bankCard.type==1}">信用卡</c:when>
												<c:when test="${bankCard.type==3}">对公账号</c:when>
												<c:otherwise>借记卡</c:otherwise>
											</c:choose></td>
										<td class="tdGround">类型：</td>
										<td><c:choose>
												<c:when test="${bankCard.mainCard==0}">主卡</c:when>
												<c:otherwise>附卡${bankCard.mainCard}</c:otherwise>
											</c:choose></td>
										<td class="tdGround">卡号：</td>
										<td>${bankCard.card_no}</td>
										<td class="tdGround">发卡行:</td>
										<td>${bankCard.bankName}</td>
										<td class="tdGround">预留收号码:</td>
										<td>${bankCard.phone}</td>
									</tr>
									<tr>
										<td class="tdGround" style="width: 180px;">添加时间</td>
										<td><fmt:formatDate value="${bankCard.createTime}"
												pattern="yyyy-MM-dd HH:mm:ss" /></td>
										<td class="tdGround">影像资料</td>
										<td colspan="7"></td>
									</tr>
								</table>
							</td>
						</tr>
						<tr>
							<td style="font-weight: bold">联系人</td>
							<td>
								<table class="userTable">
									<tr>
										<td class="tdGround" style="width: 180px;">关系:</td>
										<td>${user.fristContactRelation}</td>
										<td class="tdGround">姓名：</td>
										<td>${user.firstContactName}</td>
										<td class="tdGround">电话：</td>
										<td>${user.firstContactPhone}</td>
										<td class="tdGround">来源:</td>
										<td>系统上传</td>
									</tr>
									<tr>
										<td class="tdGround" style="width: 180px;">关系:</td>
										<td>${user.secondContactRelation}</td>
										<td class="tdGround">姓名：</td>
										<td>${user.secondContactName}</td>
										<td class="tdGround">电话：</td>
										<td>${user.secondContactPhone}</td>
										<td class="tdGround">来源:</td>
										<td>系统上传</td>
									</tr>
									<tr>
										<td class="tdGround" style="width: 180px;">全部联系人:</td>
										<td colspan="11"><a rel="tree161"
											href="javascript:void 0">手机通讯录</a>&nbsp;&nbsp;&nbsp;<a
											rel="tree161" href="javascript:void 0">聚立信通讯录</a>&nbsp;&nbsp;&nbsp;<a
											rel="tree161" href="javascript:void 0">手机短信</a></td>
									</tr>
								</table>
							</td>
						</tr>
						<tr>
							<td style="font-weight: bold">工作信息</td>
							<td>
								<table class="userTable">
									<tr>
										<td class="tdGround" style="font-size: 14px; width: 180px;">单位名称:</td>
										<td>${user.companyName}</td>
										<td class="tdGround" style="font-size: 14px;">公司电话：</td>
										<td>${user.companyPhone}</td>
										<td class="tdGround" style="font-size: 14px;">公司地址：</td>
										<td>${user.companyAddress}${user.companyAddressDistinct}</td>
									</tr>
									<tr>
										<td class="tdGround"
											style="font-size: 14px; width: 180px; height: 100px;">工牌证照：</td>
										<td><img src="" /></td>
										<td class="tdGround" style="font-size: 14px; height: 100px;">工作证明：</td>
										<td><c:forEach var="image" items="${InfoImage}" varStatus="status">
												<img src="${prefixUrl}${image.url}" />
											</c:forEach></td>
										<td class="tdGround" style="font-size: 14px; height: 100px;">收入证明：</td>
										<td><img src="" /></td>
									</tr>
								</table>
							</td>
						</tr>
					</tbody>
				</table>
			</fieldset>
			<fieldset>
				<legend>征信详情</legend>
				<table class="userTable">
					<tbody>
						<tr>
							<td style="font-weight: bold">征信查询</td>
							<td>
								<table class="userTable">
									<tr>
										<td class="tdGround" style="width: 180px;">芝麻信用:</td>
										<td>
											<c:choose>
												<c:when test="${riskCreditUser.zmStatus=='2' }">
													芝麻分数：
													<c:choose>
														<c:when test="${riskCreditUser.zmScore!=''}">${riskCreditUser.zmScore}分 </c:when>
														<c:otherwise>暂无</c:otherwise>
													</c:choose>	|
													芝麻行业关注度黑名单：
													<c:choose>
														<c:when test="${riskCreditUser.zmIndustyBlack=='1'}">是</c:when>
														<c:when test="${riskCreditUser.zmIndustyBlack=='2'}">否</c:when>
														<c:otherwise>暂无</c:otherwise>
													</c:choose>	|
													借贷逾期记录数：
													<c:choose>
														<c:when test="${riskCreditUser.zmOver!=null}">${riskCreditUser.zmOver}</c:when>
														<c:otherwise>暂无</c:otherwise>
													</c:choose>	|
													逾期未支付记录数：
													<c:choose>
														<c:when test="${riskCreditUser.zmNoPayOver!=null}">${riskCreditUser.zmNoPayOver}</c:when>
														<c:otherwise>暂无</c:otherwise>
													</c:choose>	|
												</c:when>
												<c:otherwise>
														 暂无芝麻信用信息				
												</c:otherwise>
											</c:choose>
										</td>
									</tr>
									<tr>
										<td class="tdGround" style="width: 180px;">蚂蚁花呗:</td>
										<td>
											蚂蚁花呗额度：
											<c:choose>
												<c:when test="${riskCreditUser.myHb!=''}">${riskCreditUser.myHb}元</c:when>
												<c:otherwise>暂无</c:otherwise>
											</c:choose>	|
										</td>
									</tr>
									<tr>
										<td class="tdGround" style="width: 180px;">同盾：</td>
										<td>
										    <c:choose>
												<c:when test="${riskCreditUser.tdStatus=='2' }">
													同盾分（分值越高风险越大）：
													<c:choose>
														<c:when test="${riskCreditUser.tdScore!=''}">${riskCreditUser.tdScore}分</c:when>
														<c:otherwise>暂无</c:otherwise>
													</c:choose>	|
													同盾手机网贷黑名单个数：
													${riskCreditUser.tdPhoneBlack}	|
													同盾身份证号网贷黑名单个数： 
													${riskCreditUser.tdCardNumBlack}	|
												</c:when>
												<c:otherwise>
														 暂无同盾数据信息		
												</c:otherwise>
											</c:choose>
										</td>
									</tr>
									<tr>
										<td class="tdGround" style="width: 180px;">白骑士：</td>
										<td>
											 <c:choose>
												<c:when test="${riskCreditUser.bqsStatus=='2' }">
													白骑士状态：
													<c:choose>
														<c:when test="${riskCreditUser.bqsBlack=='1'}">通过</c:when>
														<c:when test="${riskCreditUser.bqsBlack=='2'}">拒绝（命中黑名单）</c:when>
														<c:when test="${riskCreditUser.bqsBlack=='3'}">建议人工审核(命中灰名单)</c:when>
														<c:otherwise>暂无</c:otherwise>
													</c:choose>	|
												</c:when>
												<c:otherwise>
														 暂无白骑士数据信息	
												</c:otherwise>
											 </c:choose>	
										</td>
									</tr>
									
									<tr>
										<td class="tdGround" style="width: 180px;">91征信：</td>
										<td>
											 <c:choose>
												<c:when test="${riskCreditUser.jyStatus=='2' }">
													91征信借款总数：
													<c:choose>
														<c:when test="${riskCreditUser.jyLoanNum!=nul}">${riskCreditUser.jyLoanNum}</c:when>
														<c:otherwise>暂无</c:otherwise>
													</c:choose>	|
													征信拒单记录数：
													<c:choose>
														<c:when test="${riskCreditUser.jyJdNum!=nul}">${riskCreditUser.jyJdNum}</c:when>
														<c:otherwise>暂无</c:otherwise>
													</c:choose>	|
													拒单占比：
													<c:choose>
														<c:when test="${riskCreditUser.jyJdBl!=nul}">${riskCreditUser.jyJdBl}</c:when>
														<c:otherwise>暂无</c:otherwise>
													</c:choose>	|
													逾期记录数：
													<c:choose>
														<c:when test="${riskCreditUser.jyOverNum!=nul}">${riskCreditUser.jyOverNum}</c:when>
														<c:otherwise>暂无</c:otherwise>
													</c:choose>	|
													91征信逾期记录占比：
													<c:choose>
														<c:when test="${riskCreditUser.jyOverBl!=nul}">${riskCreditUser.jyOverBl}</c:when>
														<c:otherwise>暂无</c:otherwise>
													</c:choose>	|
											  </c:when>
											  <c:otherwise>
													  暂无91征信数据信息	
											  </c:otherwise>
											</c:choose>	
										</td>
									</tr>
									<tr>
										<td class="tdGround" style="width: 180px;">密罐</td>
										<td>
											<c:choose>
												<c:when test="${riskCreditUser.mgStatus=='2' }">
													密罐黑中介分(分值越小风险越大)：
													<c:choose>
														<c:when test="${riskCreditUser.mgBlackScore!=nul}">${riskCreditUser.mgBlackScore}</c:when>
														<c:otherwise>暂无</c:otherwise>
													</c:choose>	|
												</c:when>
												<c:otherwise>
													暂无密罐数据信息	
												</c:otherwise>
											</c:choose>	
										</td>
									</tr>
									
									<tr>
										<td class="tdGround" style="width: 180px;">宜信</td>
										<td>
											<c:choose>
												<c:when test="${riskCreditUser.yxStatus=='2' }">
													宜信命中风险名单的记录数：
													<c:choose>
														<c:when test="${riskCreditUser.yxFxNum!=nul}">${riskCreditUser.yxFxNum}</c:when>
														<c:otherwise>暂无</c:otherwise>
													</c:choose>	|
													宜信三个月以上逾期发生的次数：
													<c:choose>
														<c:when test="${riskCreditUser.yxMonth3Over!=nul}">${riskCreditUser.yxMonth3Over}</c:when>
														<c:otherwise>暂无</c:otherwise>
													</c:choose>	|
													宜信三个月以内逾期发生的次数：
													<c:choose>
														<c:when test="${riskCreditUser.yxLessMonth3Over!=nul}">${riskCreditUser.yxLessMonth3Over}</c:when>
														<c:otherwise>暂无</c:otherwise>
													</c:choose>	|
											</c:when>
											<c:otherwise>
												暂无宜信数据信息	
											</c:otherwise>
										</c:choose>	
									</td>
								 </tr>
								 
								 <tr>
										<td class="tdGround" style="width: 180px;">中智诚</td>
										<td>
											<c:choose>
												<c:when test="${riskCreditUser.zzcStatus=='2' }">
														中智诚反欺诈风险级别:
														<c:choose>
															<c:when test="${riskCreditUser.zzcFqz=='1'}">高(最差)</c:when>
															<c:when test="${riskCreditUser.zzcFqz=='2'}">中(中等)</c:when>
															<c:when test="${riskCreditUser.zzcFqz=='3'}">低(最好)</c:when>
															<c:otherwise>暂无</c:otherwise>
														</c:choose>	|
												</c:when>
												<c:otherwise>
													暂无中智诚数据信息	
												</c:otherwise>
											</c:choose>	
										</td>
								 </tr>
									
								</table>
							</td>
						</tr>
						<tr>
							<td style="font-weight: bold">规则配置</td>
							<td>
									<c:choose>
										<c:when test="${not empty riskRuleCalList}">
											<table class="userTable">
												<c:forEach var="item" items="${riskRuleCalList}">
													<tr>
														<td class="tdGround" style="width: 180px;">${item.ruleName }:
														<c:choose>
															<c:when test="${item.ruleValue eq '1'}">通过</c:when>
															<c:when test="${not empty JC_RESULT[item.ruleValue]}">${JC_RESULT[item.ruleValue]}</c:when>
															<c:otherwise>${item.ruleValue}</c:otherwise>
														</c:choose>
														</td>
													</tr>
												</c:forEach>
											</table>
										</c:when>
										<c:otherwise>暂无</c:otherwise>
									</c:choose>
									
							</td>	
						</tr>
						
						<tr>
							<td style="font-weight: bold">历史借款记录</td>
							<!-- 							<td>暂无信息</td> -->
							<td  ><table class="detailB" width="100%">
									<tr>
										<th align="center">序号</th>
										<th align="left">订单号</th>
										<th align="center">借款金额(元)</th>
										<th align="center">借款期限</th>
										<th align="center">服务费利率(万分之一)</th>
										<th align="center">服务费(元)</th>
										<th align="center">申请时间</th>
										 
										<th align="center">放款时间	</th>
						<th align="center">子类型	</th>
										<th align="center">状态</th>
									</tr>
								<c:forEach var="borrow" items="${userBorrows }" varStatus="status">
								
								<tr    >
							<td>
								${status.count}
							</td>
							<td>
								${borrow.outTradeNo}
							</td>							 
							<td>
 							<fmt:formatNumber type="number" value="${borrow.moneyAmount/100}" pattern="0.00" maxFractionDigits="2"/>
							</td>
									<td>
								${borrow.loanTerm }	

							</td>
								<td>
								 
						<fmt:formatNumber type="number" value="${borrow.apr}" pattern="0.00" maxFractionDigits="2"/>
							</td>
 		<td>
							<fmt:formatNumber type="number" value="${borrow.loanInterests/100}" pattern="0.00" maxFractionDigits="2"/>
							</td>
									<td>
 							<fmt:formatDate value="${borrow.orderTime }" pattern="yyyy-MM-dd HH:mm:ss"/>
							</td>
						 
						 
				 
							 
					<td>
 							<fmt:formatDate value="${borrow.loanTime }" pattern="yyyy-MM-dd HH:mm:ss"/>
							</td>
						
						 
									<td>
 						${borrow.orderTypeName }
							</td>
									<td>
 ${borrow.statusName }	
							</td>
 
						</tr>
								
								</c:forEach>
								</table></td>
						</tr>
					</tbody>
				</table>
			</fieldset>
							<fieldset>
					  <legend>审核信息</legend>
				<table class="userTable">
					<tbody>
						<tr>
							<td style="font-weight:bold">初审</td>
							<td>
								<table class="userTable">
									<tr>
										<td class="tdGround" style="width:180px;">审核人:</td>
										<td style="width:180px;">${borrow.verifyTrialUser}</td>
										<td class="tdGround" style="width:180px;">审核时间:</td>
										<td style="width:180px;"><fmt:formatDate
												value="${borrow.verifyTrialTime}"
												pattern="yyyy-MM-dd HH:mm:ss" /></td>
									</tr>
									<tr>
										 
									<td class="tdGround" style="width:180px;">审核备注:</td>
 										<td colspan="3"> 
									<textarea class="textInput valid" rows="5" cols="100%"
												readonly="readonly">${borrow.verifyTrialRemark}</textarea>
									</td>
									</tr>
									 
								</table>
							</td>
						</tr>
						<tr>
							<td style="font-weight:bold">复审</td>
							<td>
								<table class="userTable">
									<tr>
										<td class="tdGround" style="width:180px;">审核人:</td>
										<td style="width:180px;">${borrow.verifyReviewUser}</td>
										<td class="tdGround" style="width:180px;">审核时间:</td>
										<td style="width:180px;"><fmt:formatDate
												value="${borrow.verifyReviewTime}"
												pattern="yyyy-MM-dd HH:mm:ss" /></td>
									</tr>
									<tr>
										 
									<td class="tdGround" style="width:180px;">审核备注:</td>
 										<td colspan="3"> 
									<textarea class="textInput valid" rows="5" cols="100%"
												readonly="readonly">${borrow.verifyReviewRemark}</textarea>
									</td>
									</tr>
									 
								</table>
							</td>
						</tr>
						<tr>
							<td style="font-weight:bold">放款审核</td>
							<td>
								<table class="userTable">
									<tr>
										<td class="tdGround" style="width:180px;">审核人:</td>
										<td style="width:180px;">${borrow.verifyLoanUser}</td>
										<td class="tdGround" style="width:180px;">审核时间:</td>
										<td style="width:180px;"><fmt:formatDate
												value="${borrow.verifyLoanTime}"
												pattern="yyyy-MM-dd HH:mm:ss" /></td>
									</tr>
									<tr>
										 
									<td class="tdGround" style="width:180px;">审核备注:</td>
 										<td colspan="3"> 
									<textarea class="textInput valid" rows="5" cols="100%"
												readonly="readonly">${borrow.verifyLoanRemark}</textarea>
									</td>
									</tr>
									 
								</table>
							</td>
						</tr>
					</tbody>
				</table>
				</fieldset>
		</div>
	</div>
</body>
</html>
